<template>
  <div class="egrid-cell-view-text-overflow">
    {{ text }}
  </div>
</template>

<script>
  import mValidate from 'utils/common-method/validate/index';
  export default {
    props: ['row', 'column'],

    computed: {
      text () {
        // 获取指定字段数据
        let value = this.row[this.column.property];
        // 判断value值是否为空，如果是则返回‘-’
        return mValidate.stringIsNullOrEmpty(value) ? '-' : value;
      }
    }
  };
</script>
<style>
  .egrid-cell-view-text-overflow {
    width: 100%;
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }
</style>
